package com.cskaoyan.service.wx;

import com.cskaoyan.Utils.MyUtils;
import com.cskaoyan.bean.userbean.Feedback;
import com.cskaoyan.bo.wx.FeedbackSubmitBo;
import com.cskaoyan.mapper.usermapper.FeedbackMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * @author hsp
 * @date 2021/5/14 9:51
 */
@Service
public class WxFeedbackServiceImpl implements WxFeedbackService {
    @Autowired
    FeedbackMapper feedbackMapper;
    @Override
    public void submitService(Feedback feedbackBo) {

        Feedback feedback = new Feedback(
                null,
                MyUtils.getUserId(),
                MyUtils.getUsername(),
                feedbackBo.getMobile(),
                feedbackBo.getFeedType(),
                feedbackBo.getContent(),
                1,
                feedbackBo.getPicUrls().length!=0,
                feedbackBo.getPicUrls(),
                new Date(),
                new Date(),
                false
        );
        feedbackMapper.insert(feedback);



    }
}
